-- GENERATED SPELL FOR [Overthane Balargarde] --


function spell0_31016(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(61085,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31016', 9500, 1)
end

function spell1_31016(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15043,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31016', 7000, 1)
end

function spell2_31016(pUnit, Event) --@Heroic Leap,n/a--
pUnit:FullCastSpellOnTarget(60108,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31016', 0, 1)
end

function spell3_31016(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(61076,pUnit)
pUnit:RegisterEvent('Sorts_31016', 10000, 1)
end

function Sorts_31016(pUnit, Event)
local choix_sorts_31016 = math.random(0, 3)
if choix_sorts_31016 == 0 then
pUnit:RegisterEvent('spell0_31016', 1, 1)
end
if choix_sorts_31016 == 1 then
pUnit:RegisterEvent('spell1_31016', 1, 1)
end
if choix_sorts_31016 == 2 then
pUnit:RegisterEvent('spell2_31016', 1, 1)
end
if choix_sorts_31016 == 3 then
pUnit:RegisterEvent('spell3_31016', 1, 1)
end
end

function mob31016_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31016', math.random(1500, 3000), 1)
end

function mob31016_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31016_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31016_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31016, 1, 'mob31016_Action')
RegisterUnitEvent(31016, 2, 'mob31016_Leave')
RegisterUnitEvent(31016, 3, 'mob31016_Kill')
RegisterUnitEvent(31016, 4, 'mob31016_Die')
